#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
void init(int* p,int n)
{
	for (int i = 0; i < n; i++)
	{
		p[i] = 0;
	}
}
void print(int* p,int n)
{
	for (int i = 0; i < n; i++)
	{
		printf("%d ", p[i]);
	}
	printf("\n");
}
void reverse(int* p, int n)
{
	int left = 0;
	int right = n - 1;
	while (left < right)
	{
		int temp = p[left];
		p[left] = p[right];
		p[right] = temp;
		left++;
		right--;
	}
}
int main()
{
	int a[10];
	int n = sizeof(a) / sizeof(a[0]);
	init(a,n);
	for (int i = 0; i < n; i++)
	{
		a[i] = i + 1;
	}
	print(a, n);
	reverse(a, n);
	print(a, n);
	return 0;
}